package com.iot08.common.entity.app;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;

@Data
@Document("device_notification")
public class DeviceNotification implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    private String id;

    //设备imei
    @Field("i")
    private String imei;

    private String name;

    //管理员转让
    private String transfered_openid;

    private String phone;

    //接收用户
    private String openid;

    //  接收用户openid (如果是 "all" 的就是推送全部,同时openid="")
    @Field("accept_user")
    private String acceptUser;

    //消息类型 (系统:systemUpdate, 云蜻:YXNew)
    @Field("T")
    private String type;

    //标题
    private String title;

    //内容
    private String content;

    //目录id
    private String directoryid;

    //(云蜻广告才有)消息跳转类型 (跳详情:999/跳任务中心:1)
    private String jumptype;

    //可跳转的URL
    private String url;

    //是否推送的状态(推送了才会在APP 消息中心显示)
    private Integer status;

    //跳转类型；1=文字通知；2=内部跳转；3=小程序；4=公众号；5=广告SDK
    @Field("skip_type")
    private Integer skipType;

    //小程序ID
    @Field("small_program_id")
    private String smallProgramId;
    //小程序跳转的商品ID
    @Field("small_program_path")
    private String smallProgramPath;

    //按钮底图的完整URL连接
    @Field("bottom_btn_image")
    private String bottomBtnImage;
    //包含二维码的图的完整URL连接
    @Field("include_QRcode_image")
    private String includeQRcodeImage;
    //点击按钮图片,截图提示跳转的内容
    @Field("jump_tips_words")
    private String jumpTipsWords;

    //广告商
    @Field("advert_firm")
    private String advertFirm;

    private String msgid;

    //后台创建该消息的用户
    private String creater;

    //创建时的时间戳
    @Field("t")
    private Long time;
    //失效的日期时间
    private Date expiryAt;
    //日期
    private Date createTime;

}
